package com.dhnsoft.boot3.message.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.config.TopicBuilder;

/**
 * @author dhn
 * @version 1.0
 * @date 2023-09-14 16:59
 * @Desc
 */
@Configuration
public class AppKafkaConfiguration {

    @Bean
    public NewTopic topic1(){
        return TopicBuilder.name("thing")
                .partitions(1)
                .compact()
                .build();
    }
}
